package abg.core.domain.db;

import abg.core.common.mybatis.config.FieldInsert;
import abg.core.common.mybatis.config.FieldSet;
import abg.core.common.mybatis.config.FieldUpdate;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Table(value = "sys_msg_read", onUpdate = FieldUpdate.class, onInsert = FieldInsert.class, onSet = FieldSet.class)
public class SysMsgRead extends ZBEntity implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    //消息ID
    private String msgId;

    //读取人ID；
    private String readUserId;

    //是否已读;0=未读；1=已读；默认为0
    private String isRead;

    //读取时间，默认为NULL
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public LocalDateTime readTime;

}
